package Object;

public class Test {

//    public static void runAnimal(Animal animal){
//        animal.run();
//    }
    public static void main(String[] args) {
        Animal animal = new Animal();
        animal.run();
        animal = new Cat();
//        animal.eat();
        if(animal instanceof Cat){
            Cat cat = (Cat)animal;
            cat.eat();
        }

//        animal = new Dog();
//        animal.run();
//        animal = new Fish();
//        animal.run();

//        runAnimal(new Dog());
//        runAnimal(new Cat());
//        runAnimal(new Fish());

    }

}
